org.eclipse.vtp.framework.engine.support
Class AbstractContext

java.lang.Object
  extended by org.eclipse.vtp.framework.engine.support.AbstractReporter
      extended by org.eclipse.vtp.framework.engine.support.AbstractLogger
          extended by org.eclipse.vtp.framework.engine.support.AbstractContext
All Implemented Interfaces:
IContext, ILogger, IReporter
Direct Known Subclasses:
AbstractActionContext, AbstractExecutionContext, AbstractProcessContext, AbstractSessionContext

public abstract class AbstractContext
extends AbstractLogger
implements IContext

A support implementation of the IContext interface.

Author:
Lonnie Pryor

Field Summary
 
Fields inherited from interface org.eclipse.vtp.framework.core.IReporter
SEVERITY_DEBUG, SEVERITY_ERROR, SEVERITY_INFO, SEVERITY_WARN
 
Constructor Summary
protected AbstractContext()
          Creates a new AbstractContext.
 
Method Summary
 java.lang.Object lookup(java.lang.String identifier)
          Looks up the service selected for the specified identifier or null if no such service exists.
 java.lang.Object[] lookupAll(java.lang.String identifier)
          Returns an array containing all the services registered under the specified identifier.
protected  java.lang.Object[] lookupAllInheritedServices(java.lang.String identifier)
          Returns all the services registered under the specified identifier in any ancestor registry or null if no such services can be found.
protected  java.lang.Object[] lookupAllLocalServices(java.lang.String identifier)
          Returns all the services registered under the specified identifier in this registry or null if no such services can be found.
protected  java.lang.Object lookupInheritedService(java.lang.String identifier)
          Returns a service registered under the specified identifier in any ancestor registry or null if no such service exists.
protected  java.lang.Object lookupLocalService(java.lang.String identifier)
          Returns a service registered under the specified identifier in this registry or null if no such service exists.
protected  java.lang.Object lookupReservedService(java.lang.String identifier)
          Returns the reserved service if the specified identifier is one of the reserved identifiers or null if these conditions are not met.
 
Methods inherited from class org.eclipse.vtp.framework.engine.support.AbstractLogger
debug, debug, debug, debug, doLog, error, error, error, error, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isWarnEnabled, log, log, log, log, warn, warn, warn, warn
 
Methods inherited from class org.eclipse.vtp.framework.engine.support.AbstractReporter
doReport, report, report, report, report
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.vtp.framework.core.ILogger
debug, debug, debug, debug, error, error, error, error, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isWarnEnabled, log, log, log, log, warn, warn, warn, warn
 
Methods inherited from interface org.eclipse.vtp.framework.core.IReporter
isSeverityEnabled, report, report, report, report
 

Constructor Detail

AbstractContext

protected AbstractContext()
Creates a new AbstractContext.

Method Detail

lookupReservedService

protected java.lang.Object lookupReservedService(java.lang.String identifier)
Returns the reserved service if the specified identifier is one of the reserved identifiers or null if these conditions are not met.

Parameters:
identifier - The identifier of the service to return, will never be null.
Returns:
The reserved service if the specified identifier is one of the reserved identifiers or null if these conditions are not met.

lookupLocalService

protected java.lang.Object lookupLocalService(java.lang.String identifier)
Returns a service registered under the specified identifier in this registry or null if no such service exists.

Parameters:
identifier - The identifier of the service to return, will never be null.
Returns:
A service registered under the specified identifier in this registry or null if no such service exists.

lookupAllLocalServices

protected java.lang.Object[] lookupAllLocalServices(java.lang.String identifier)
Returns all the services registered under the specified identifier in this registry or null if no such services can be found.

Parameters:
identifier - The identifier of the services to return, will never be null.
Returns:
All the services registered under the specified identifier in this registry or null if no such services can be found.

lookupInheritedService

protected java.lang.Object lookupInheritedService(java.lang.String identifier)
Returns a service registered under the specified identifier in any ancestor registry or null if no such service exists.

Parameters:
identifier - The identifier of the service to return, will never be null.
Returns:
A service registered under the specified identifier in any ancestor registry or null if no such service exists.

lookupAllInheritedServices

protected java.lang.Object[] lookupAllInheritedServices(java.lang.String identifier)
Returns all the services registered under the specified identifier in any ancestor registry or null if no such services can be found.

Parameters:
identifier - The identifier of the services to return, will never be null.
Returns:
All the services registered under the specified identifier in any ancestor registry or null if no such services can be found.

lookup

public final java.lang.Object lookup(java.lang.String identifier)
                              throws java.lang.NullPointerException
Description copied from interface: IContext
Looks up the service selected for the specified identifier or null if no such service exists.

Specified by:
lookup in interface IContext
Parameters:
identifier - The identifier of the service to look up.
Returns:
The service selected for the specified identifier or null if no such service exists.
Throws:
java.lang.NullPointerException - If the supplied identifier is null.

lookupAll

public final java.lang.Object[] lookupAll(java.lang.String identifier)
                                   throws java.lang.NullPointerException
Description copied from interface: IContext
Returns an array containing all the services registered under the specified identifier.

Specified by:
lookupAll in interface IContext
Parameters:
identifier - The identifier of the services to look up.
Returns:
An array containing all the services registered under the specified identifier.
Throws:
java.lang.NullPointerException - If the supplied identifier is null.